package com.ghxxzx.daglcustom.business_form.service;

import com.ghxxzx.daglcustom.business_form.domain.FormPo;
import com.ghxxzx.daglcustom.business_form.domain.dto.FormQuery;
import org.springframework.stereotype.Service;
import org.tmsps.ne4spring.base.BaseService;
import org.tmsps.ne4spring.base.ne.NePage;
import org.tmsps.ne4spring.orm.param.NeParamList;

@Service
public class Form2Service extends BaseService {

	public NePage list(FormQuery formQuery) {
		
		String sql = "select tf.* from t_form tf where tf.status=0 and (tf.type_kid=?)";
		NeParamList params = NeParamList.makeParams();
		params.add(formQuery.getType_kid());
		NePage page2 = bs.queryForNePage(sql, params, formQuery.getSort(), formQuery.getPage());
		return page2;
	}

	public FormPo getFormByFormKey(String form_key) {
		FormPo formPo = bs.findById(form_key, FormPo.class);
		return formPo;
	}

}
